/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package servlets;

import beans.SeekerCustomer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Dhruv
 */

//abstract class Action explemplifies use of the Command design pattern
//an action represents a single application model operation
public abstract class Action {

    //this is the javabeans class (model)
    protected SeekerCustomer model;
    
    //constructor
    public Action(SeekerCustomer model) {
        this.model = model;
    }
    
    //ControllerServlet class looks up concrete Action subclasses 
    //by name and delegate requests to them
    public abstract String getName();
    
    //the respective concrete Action subclasses execute their operations here
    public abstract Object perform(HttpServletRequest req, HttpServletResponse resp);
};